//Jen Anderson
//CS 362
//Assignment 3
//cardtest1.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dominion.h"
#include <assert.h>

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1

void testVillage()
{
	//Initialize a new game
        int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};
        struct gameState *game = newGame();
        initializeGame(3, k, 10, game);
        struct gameState *testGameState = malloc(sizeof(struct gameState));
        memcpy(testGameState, game, sizeof(struct gameState));
        
	//Set coin count to 0 and call the card effect
	int coin = 0;
        //cardEffect(village, 0, 0, 0, testGameState, 0, &coin);

	//Tests
	//Village rules: 
	//	+1 card
	//	+2 actions
	//	discard village hand
	
	//The number of cards in the hand should stay the same because a card is gained but the Village card is discarded 
	int playerHandCount = testGameState -> handCount[testGameState->whoseTurn];
	printf("Player hand count before village card drawn: %d.\n", playerHandCount); 
        cardEffect(village, 0, 0, 0, testGameState, 0, &coin);
	int newPlayerHandCount = testGameState -> handCount[testGameState->whoseTurn];
        printf("Player hand count after village card drawn: %d.\n", newPlayerHandCount);
}

int main(int argc, char *argv[])
{
    	testVillage();
    	return 0;
}
